package com.hnevc.zz.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;

import com.hnevc.zz.R;

public class LoadingActivity extends AppCompatActivity {
    private boolean isFirstUse=false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_loading2);
        if (isFirstUse==false){
            new Handler().postDelayed(new Runnable(){
                @Override
                public void run() {
                    Intent mainIntent = new Intent(LoadingActivity.this, LoginActivity.class);
                    startActivity(mainIntent);
                    isFirstUse=true;
                    finish();
                }
            },3000);
        }else {
            Intent mainIntent = new Intent(LoadingActivity.this, LoginActivity.class);
            startActivity(mainIntent);
            finish();
        }

    }
}
